<?php

namespace App\Http\Requests\Instructors;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;

class InstructorsStoreRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return Auth::check();
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
     */
    public function rules(): array
    {
        return [
            'name' => 'required|string',
            'second_name' => 'nullable|string',
            'surname' => 'nullable|string',
            'sports' => 'nullable|array',
            'status' => 'nullable|string',
            'recertification' => 'nullable|string',
            'teamGame' => 'nullable|string',
            'centers_id' => 'nullable|string',
            'gender' => 'nullable|string',
            'cert_valid' => 'nullable|string',
            'photo' => 'required|image|mimes:jpg,webp,png,jpeg,gif,svg|max:10240|dimensions:min_width=100,min_height=100,max_width=10000,max_height=10000',
        ];
    }
}
